load("//tools:defaults.bzl", "ts_config", "ts_project", "zoneless_jasmine_test", "zoneless_web_test_suite")

ts_config(
    name = "tsconfig_test",
    src = "tsconfig-test.json",
    deps = [
        "//:node_modules/@types/dom-navigation",
        "//packages:tsconfig_test",
    ],
)

ts_project(
    name = "test_lib",
    testonly = True,
    srcs = glob(["**/*.ts"]),
    tsconfig = ":tsconfig_test",
    # Visible to //:saucelabs_unit_tests_poc target
    visibility = ["//:__pkg__"],
    deps = [
        "//:node_modules/rxjs",
        "//packages/common",
        "//packages/common/testing",
        "//packages/core",
        "//packages/core/rxjs-interop",
        "//packages/core/testing",
        "//packages/platform-browser",
        "//packages/platform-browser/testing",
        "//packages/private/testing",
        "//packages/router",
        "//packages/router/testing",
    ],
)

zoneless_jasmine_test(
    name = "test",
    data = [
        ":test_lib",
    ],
)

zoneless_web_test_suite(
    name = "test_web",
    deps = [
        ":test_lib",
    ],
)
